﻿<Application 
    x:Class="MediaLibrary.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Exit="App_Exit" 
    Startup="App_Startup" 
    ShutdownMode="OnExplicitShutdown">
    
    <Application.Resources>        
        <Image Source="resources/play.png" x:Key="PlayButtonImage" />

        <Image Source="resources/pause.png" x:Key="PauseButtonImage" />

        <Image Source="resources/next.png" x:Key="NextButtonImage" />

        <Image Source="resources/nextHover.png" x:Key="NextHoverButtonImage" />

        <Image Source="resources/previous.png" x:Key="PreviousButtonImage" />

        <Image Source="resources/previousHover.png" x:Key="PreviousHoverButtonImage" />

        <Image Source="resources/stop.png" x:Key="StopButtonImage" />

        <Image Source="resources/mutechecked.png" x:Key="MuteCheckedButtonImage" />

        <Image Source="resources/muteUnchecked.png" x:Key="MuteUncheckedButtonImage" />

        <Image Source="resources/info1.png" x:Key="Info1ButtonImage" />

        <Image Source="resources/info2.png" x:Key="Info2ButtonImage" />

        <Image Source="resources/info3.png" x:Key="Info3ButtonImage" />
               
        <Style x:Key="favoritesBigLabel" TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="16" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Foreground" Value="White" />
        </Style>

        <Style x:Key="dataGridHeaderStyle" TargetType="{x:Type DataGridColumnHeader}" >
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Height" Value="20" />
            <Setter Property="Margin" Value="3 10 10 10" />
            <Setter Property="FontSize" Value="14" />
        </Style>

        <Style x:Key="dataGridRowStyle" TargetType="{x:Type DataGridRow}">
            <Setter Property="Margin" Value="3 0 3 3" />
            <Setter Property="FontSize" Value="14" />
        </Style>

        <Style x:Key="dataGridCellStyle" TargetType="{x:Type DataGridCell}">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="FontSize" Value="14" />
        </Style>

        <Style x:Key="favoritesSelectedStyle" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Border 
                            x:Name="Bd" 
                            SnapsToDevicePixels="true" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Padding="{TemplateBinding Padding}"
                            Opacity="{TemplateBinding Opacity}">

                            <ContentPresenter 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </Trigger>

                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>

                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="eventSelectedStyle" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Border 
                            x:Name="Bd" 
                            SnapsToDevicePixels="true" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Padding="{TemplateBinding Padding}"
                            Opacity="{TemplateBinding Opacity}">

                            <ContentPresenter 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent"/>
                                <Setter Property="BorderBrush" Value="Transparent" />
                                <Setter Property="BorderThickness" Value="0" />
                            </Trigger>
                            
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="Transparent" />
                                <Setter Property="BorderThickness" Value="0" />
                            </Trigger>

                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>

                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="Transparent" />
                                <Setter Property="BorderThickness" Value="0" />
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="selectedStyle" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Border 
                            x:Name="Bd" 
                            SnapsToDevicePixels="true" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Padding="{TemplateBinding Padding}"
                            Opacity="{TemplateBinding Opacity}">

                            <ContentPresenter 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </Trigger>

                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>

                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </MultiTrigger>

                            <Trigger Property="IsEnabled" Value="false">
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="searchSelectedStyle" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Border 
                            x:Name="Bd" 
                            SnapsToDevicePixels="true" 
                            Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            Padding="{TemplateBinding Padding}"
                            Opacity="{TemplateBinding Opacity}">

                            <ContentPresenter 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </Trigger>

                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>

                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                                <Setter Property="Background" TargetName="Bd" Value="Transparent" />
                                <Setter Property="BorderBrush" Value="LightGray" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="Padding" Value="0" />
                                <Setter Property="Opacity" Value="0.7" />
                            </MultiTrigger>

                            <Trigger Property="IsEnabled" Value="false">
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="playlistDataTemplate">
            <StackPanel Background="Transparent" Height="30">
                <TextBlock Text="{Binding Path=Title}" Foreground="White" Background="Transparent" VerticalAlignment="Center" TextTrimming="WordEllipsis" />
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="eventDataTemplate">
            <StackPanel Background="Transparent" Margin="0 0 0 15">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Path=Title}" Foreground="White" Background="Transparent" VerticalAlignment="Top" TextTrimming="WordEllipsis" FontSize="20" />
                    <TextBlock Text="{Binding Path=Headliner}" Foreground="Wheat" Margin="15 4 0 0"  FontSize="16" />
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 2 0 0">
                    <TextBlock Text="{Binding Path=VenueName}" Foreground="#aa787d" Padding="0 0 0 0" FontSize="14" />
                    <TextBlock Text="," Foreground="#aa787d" Background="Transparent" FontSize="14" />
                    <TextBlock Text="{Binding Path=StartDate}" Foreground="#aa787d" Padding="8 0 0 0" FontSize="14" />
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10 2 0 0">
                    <TextBlock Text="{Binding Path=City}" Foreground="#77787d" Background="Transparent" FontSize="13" />
                    <TextBlock Text=", " Foreground="#77787d" Background="Transparent" FontSize="13" />
                    <TextBlock Text="{Binding Path=Country}" Foreground="#77787d" Background="Transparent" FontSize="13" />
                </StackPanel>
                <TextBlock Text="Other Artists:" Foreground="White" Padding="0 0 10 0" FontSize="12" Margin="10 3 0 0" />
                <ListView ItemsSource="{Binding Path=Artists}" 
                         Background="Transparent" 
                         Foreground="White" 
                         FontSize="11" 
                         Margin="15 0 0 0" 
                         SelectionMode="Single" 
                         BorderBrush="Transparent" 
                         BorderThickness="0"
                         ScrollViewer.CanContentScroll="False"
                         ScrollViewer.IsDeferredScrollingEnabled="True"
                         ItemContainerStyle="{DynamicResource eventSelectedStyle}" />
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="nowPlayingAudioDataTemplate">
            <StackPanel Background="Transparent" Height="30" Margin="0,1,0,1">
                <TextBlock Text="{Binding Path=Tag.Title}" Foreground="White" Background="Transparent" VerticalAlignment="Top" TextTrimming="WordEllipsis" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Path=Tag.AlbumArtist}" Foreground="#aa787d" Padding="0 0 10 0" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" />
                    <TextBlock Text="{Binding Path=Tag.Album}" Foreground="#77787d" Padding="0 0 10 0" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" Padding="0 0 10 0" />
                    <TextBlock Grid.Column="1" Foreground="White" Background="Transparent" VerticalAlignment="Top">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="nowPlayingVideoDataTemplate">
            <StackPanel Background="Transparent" Height="30" Margin="0,1,0,1">
                <TextBlock Grid.Column="0" Text="{Binding Path=Tag.Title}" Foreground="White" Background="Transparent" VerticalAlignment="Top" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Grid.Column="1" Foreground="#77787d" Background="Transparent" VerticalAlignment="Top">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="favoriteAudioDataTemplate">
            <StackPanel Background="Transparent" Height="53" Margin="0,1,0,1">
                <TextBlock Text="{Binding Path=Tag.Title}" Foreground="White" Background="Transparent" VerticalAlignment="Top" TextTrimming="WordEllipsis" FontSize="13" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Path=Tag.AlbumArtist}" Foreground="#aa787d" Padding="0 0 10 0" FontSize="12" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" FontSize="12" />
                    <TextBlock Text="{Binding Path=Tag.Album}" Foreground="#77787d" Padding="0 0 10 0" FontSize="12" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" Padding="0 0 10 0" FontSize="12" />
                    <TextBlock Grid.Column="1" Foreground="White" Background="Transparent" VerticalAlignment="Top" FontSize="12">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Play Count: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=PlayCount}"  Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text=", Rating: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=UserMediaRating}"  Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text=", Genre: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=Tag.Genre}"  Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text=", Composers: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=Tag.Composers[0]}"  Foreground="White" Background="Transparent" FontSize="11" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="favoriteVideoDataTemplate">
            <StackPanel Background="Transparent" Margin="0 1 0 1">
                <TextBlock Grid.Column="0" Text="{Binding Path=Tag.Title}" Foreground="White" Background="Transparent" VerticalAlignment="Top" TextTrimming="WordEllipsis" FontSize="12" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Run Time: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Grid.Column="1" Foreground="#77787d" Background="Transparent" VerticalAlignment="Top" FontSize="11">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                    <TextBlock Text=", Play Count: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=PlayCount}"  Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text=", Rating: " Foreground="White" Background="Transparent" FontSize="11" />
                    <TextBlock Text="{Binding Path=UserMediaRating}"  Foreground="White" Background="Transparent" FontSize="11" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="currentlyPlayingNowPlayingAudioDataTemplate">
            <StackPanel Background="#181818" Height="53">
                <TextBlock Text="{Binding Path=Tag.Title}" Foreground="LightBlue" FontWeight="Bold" Background="Transparent" VerticalAlignment="Top" TextTrimming="WordEllipsis" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Path=Tag.AlbumArtist}" Foreground="#aa787d" Padding="0 0 10 0" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" />
                    <TextBlock Text="{Binding Path=Tag.Album}" Foreground="#77787d" Padding="0 0 10 0" />
                    <TextBlock Text="-  " Foreground="White" Background="Transparent" Padding="0 0 10 0" />
                    <TextBlock Grid.Column="1" Foreground="White" Background="Transparent" VerticalAlignment="Top">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Play Count: " Foreground="White" Background="Transparent" />
                    <TextBlock Text="{Binding Path=PlayCount}"  Foreground="White" Background="Transparent" />
                    <TextBlock Text=", Genre: " Foreground="White" Background="Transparent" />
                    <TextBlock Text="{Binding Path=Tag.Genre}"  Foreground="White" Background="Transparent" />
                    <TextBlock Text=", Composers: " Foreground="White" Background="Transparent" />
                    <TextBlock Text="{Binding Path=Tag.Composers[0]}"  Foreground="White" Background="Transparent" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="currentlyPlayingNowPlayingVideoDataTemplate">
            <StackPanel Background="#181818" Height="30">
                <TextBlock Grid.Column="0" Text="{Binding Path=Tag.Title}" Foreground="LightBlue" FontWeight="Bold" Background="Transparent" VerticalAlignment="Top" />
                <StackPanel Orientation="Horizontal">
                    <TextBlock Grid.Column="1" Foreground="#77787d" Background="Transparent" VerticalAlignment="Top">
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                                <Binding Path="Duration.Hours" />
                                <Binding Path="Duration.Minutes" />
                                <Binding Path="Duration.Seconds" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Play Count: " Foreground="White" Background="Transparent" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>
        
        <DataTemplate x:Key="nowPlayingDurationDataTemplate">
            <TextBlock Foreground="White" Background="Transparent" VerticalAlignment="Top">
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}{0:00}:{1:00}:{2:00}">
                        <Binding Path="Duration.Hours" />
                        <Binding Path="Duration.Minutes" />
                        <Binding Path="Duration.Seconds" />
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
        </DataTemplate>

        <DataTemplate x:Key="currentPlaylistDataTemplate">
            <StackPanel Orientation="Horizontal" Background="Transparent">
                <TextBlock Text="{Binding Path=Tag.Title}" Foreground="White"  />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=Tag.AlbumArtist}" Foreground="#77787d" />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=Tag.Album}" Foreground="#aa787d" />
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="playlistListBlackDataTemplate">
            <Grid Background="Transparent">
                <TextBlock Text="{Binding Path=Title}" Foreground="Black" Padding="3" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="playlistListWhiteDataTemplate">
            <Grid Background="Transparent">
                <TextBlock Text="{Binding Path=Title}" Foreground="White" Padding="3" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="automaticPlaylistListWhiteDataTemplate">
            <Grid Background="Transparent">
                <TextBlock Text="{Binding Path=PlaylistName}" Foreground="White" Padding="3" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="playlistMediaItemsDataTemplate">
            <StackPanel Grid.Column="0" Orientation="Horizontal" Background="Transparent">
                <TextBlock Text="{Binding Path=Tag.Title}" Foreground="White" Background="Transparent" />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=Tag.AlbumArtist}" Foreground="Wheat" Background="Transparent" />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=Tag.Album}" Foreground="#aa787d" Background="Transparent" />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=MimeType}" Foreground="#aa787d" Background="Transparent" />
                <TextBlock Text="  -  "/>
                <TextBlock Text="{Binding Path=Path}" Foreground="#aa787d" Background="Transparent" />
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="artistDataTemplate">
            <Grid Background="Transparent">
                <TextBlock Text="{Binding Path=Artist}" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="albumDataTemplate">
            <Grid Background="Transparent">
                <TextBlock Text="{Binding Path=Album}" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="trackDataTemplate">
            <Grid Background="Transparent">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="30" />
                    <ColumnDefinition Width="190" />
                    <ColumnDefinition Width="300" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                
                <TextBlock Grid.Column="0" Text="{Binding Path=Track}" Margin="0,2,1,0" />
                
                <TextBlock Grid.Column="1" Text="{Binding Path=Title}" Margin="10,2,1,0" />

                <TextBlock Grid.Column="2" Text="{Binding Path=FileName}" Margin="35,2,1,0" />

                <TextBlock Grid.Column="3" Text="{Binding Path=FullPath}" Margin="35,2,1,0" />
            </Grid>
        </DataTemplate>

        <ControlTemplate x:Key="settingsButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Label x:Name="contentLabel" Content="{TemplateBinding Button.Content}" />                
            </Border>
            
            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                </Trigger>
                
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="mainMenuButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 8 0">
                <Label x:Name="contentLabel" Content="{TemplateBinding Button.Content}" FontSize="20" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                    <Setter TargetName="contentLabel" Property="Foreground" Value="#ababab" />
                </Trigger>

                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="#dfdfdf" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="similarArtistButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 8 0">
                <Label x:Name="contentLabel" Content="{TemplateBinding Button.Content}" FontSize="12" Foreground="White" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                    <Setter TargetName="contentLabel" Property="Foreground" Value="#ababab" />
                </Trigger>

                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="#dfdfdf" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="settingMenuButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 4">
                <TextBlock x:Name="contentLabel" Text="{TemplateBinding Button.Content}" FontSize="16" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                </Trigger>

                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="moreInfoMenuButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Label x:Name="contentLabel" Content="{TemplateBinding Button.Content}" FontSize="14" Foreground="White" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                </Trigger>

                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="playlistButton" TargetType="Button">
            <Border x:Name="buttonBorder" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 4">
                <TextBlock x:Name="contentLabel" Text="{TemplateBinding Button.Content}" FontSize="16" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="FontWeight" Value="Bold" />
                </Trigger>

                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="playButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder">
                <Label x:Name="contentLabel" Content="{DynamicResource PlayButtonImage}" />
            </Border>
            
            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource PauseButtonImage}"/>
                </Trigger>

                <Trigger Property="ToggleButton.IsChecked" Value="False">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource PlayButtonImage}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="nextButton" TargetType="Button">
            <Border x:Name="buttonBorder" Width="32">
                <Label x:Name="contentLabel" Content="{DynamicResource NextButtonImage}" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource NextHoverButtonImage}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="previousButton" TargetType="Button">
            <Border x:Name="buttonBorder" Width="32">
                <Label x:Name="contentLabel" Content="{DynamicResource PreviousButtonImage}" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource PreviousHoverButtonImage}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="stopButton" TargetType="Button">
            <Border x:Name="buttonBorder" Height="27" Width="27">
                <Label x:Name="contentLabel" Content="{DynamicResource StopButtonImage}" />
            </Border>
        </ControlTemplate>

        <ControlTemplate x:Key="muteButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder">
                <Label x:Name="contentLabel" Content="{DynamicResource MuteUnheckedButtonImage}" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource MuteCheckedButtonImage}"/>
                </Trigger>

                <Trigger Property="ToggleButton.IsChecked" Value="False">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource MuteUnheckedButtonImage}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="infoButton" TargetType="ToggleButton">
            <Border x:Name="buttonBorder">
                <Label x:Name="contentLabel" Content="{DynamicResource Info1ButtonImage}" />
            </Border>

            <ControlTemplate.Triggers>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource Info3ButtonImage}"/>
                </Trigger>

                <Trigger Property="ToggleButton.IsChecked" Value="False">
                    <Setter TargetName="contentLabel" Property="Content" Value="{DynamicResource Info1ButtonImage}"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
    </Application.Resources>
</Application>